1. Field of the Invention
The present invention relates to a semiconductor logic circuit, and particularly to a semiconductor logic circuit for achieving logic function of expanding 4-bit, 8-bit or 16-bit data to 32-bit data. Such data are used in large scale integrated circuits (LS1) such as microprocessors.
2. Description of the Prior Art
It is frequently required to expand data of a particular bit length to data of another bit length and to process the expanded data. FIG. 1 shows a conventional logic circuit that achieves such bit expansion.
The logic circuit of FIG. 1 expands 4-bit, 8-bit or 16-bit data to 32-bit data. This logic circuit receives input data D.0. to D31 and control signals EX4, EX8 and EX16 corresponding to the bit length of the input data, and outputs 32-bit data Z.0. to Z31.
It is assumed that the logic circuit of FIG. 1 receives 4-bit input data of "1011" as D28=1, D29=0, D30=1 and D31=1. Since the 4-bit data is expanded to 32-bit data, the control signal EX4 will be 1 and the remaining control signals EX8 and EX16 will each be 0. Due to the control signal EX4 of 1, 4-input selectors 100 to 115, 3-input selectors 116 to 123 and 2-input selectors 124 to 127 select the most significant bit, i.e., the input D28 out of the 4-bit input data. Therefore, the outputs Z.0. to Z27 will each be the input D28, i.e., 1 while the outputs Z28 to Z31 will be the inputs D28 to D31, respectively. Namely, the outputs Z.0. to Z31 will be "111 . . . 11011" (twenty-eight 1s plus "1011"). In this way, 4-bit data is expanded to 32-bit data.
Similarly, 8-bit input data can be expanded to 32-bit data. For example, data of "10010101" may be given to the inputs D24 to D31, and only the control signal EX8 is set to 1. Then, the 2-input selectors 124 to 127 select the input data D24 to D27, which are outputted as they are from the outputs Z24 to Z27. On the other hand, the 4-input selectors 100 to 115 and 3-input selectors 116 to 123 select the most significant bit "1" of the outputs Z.0. to Z23. As a result, twenty-four 1s and the eight-bit data of "10010101" are outputted, thereby completing the expansion from 8-bit data to 32-bit data. Expansion from 16-bit input data to 32-bit data will be performed similarly.
As described in the above, the conventional logic circuit for achieving the bit expansion employs 4-input selectors, 3-input selectors and 2-input selectors. Therefore, hardware size of the logic circuit is large to inevitably increase the area of a chip.
FIGS. 2(a), 2(b) and 2(c) show examples of the 4-input selector, 3-input selector and 2-input selector employed in the logic circuit of FIG. 1, respectively. Assuming the selectors are formed of CMOS transistor circuits, the 4-input selector shown in FIG. 2(a) requires twenty elements, the 3-input selector of FIG. 2(b) requires fourteen elements, and the 2-input selector of FIG. 2(c) requires ten elements. As a result, the logic circuit will require a great amount of hardware.